package com.fcfspace;

import com.fcfspace.loongfei.utils.SpringUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class LoongfeiApplication {

    public static void main(String[] args) {
        SpringApplication.run(LoongfeiApplication.class, args);
        //查看所有注入容器的bean
        ApplicationContext context = SpringUtils.getApplicationContext();
        String[] names = context.getBeanDefinitionNames();
        for(String name:names){
            System.out.println("---->" + name);
        }

        //测试方式一：可以直接使用daoHelper,使用方法见 DaoTestOne.getDBData();
        //测试方式二：通过http形式访问，自动注入 daoHelper
        //通过连接 http://localhost:8080/testTwo/dbData
        //http://localhost:8080/testTwo/dbDruidData
    }

}
